package com.example.selfPractise.keyWord;

public class Employee {
    public static String companyName = "abc";

    private String name;

    private Integer age;

    public Employee() {
    }

    public Employee(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public static String getCompanyName() {
        return companyName;
    }

    public static void work() {
        Employee e = new Employee("张三", 20);
        System.out.println("我们都在" + companyName + "公司工作");
        e.achive();
    }

    public void achive() {
        System.out.println(name + "实现大成就");
    }

    public static void setCompanyName(String companyName) {
        Employee.companyName = companyName;
    }
}
